{if $delid && $what}
    <div id="img_saved">
        <input type="button" id="but" value="{$lang.delete_image}" onclick="deleteimage_saved({$delid}, '{$what}')">
        <img id="thumbnail" src="{$img}" style="margin-top: 5px;">
    </div>
{/if}          
    <div id="img_new" {if $delid && $what}style="display:none;"{/if}>
                    <div id="select_image">
                        <b>{$lang.input_url}</b> 
                        <div id="select_image_btns" style="margin-bottom: 10px; width: 152px;">
                           {* <input type="text" style="width: 371px;" name="img_url" title="{$lang.input_url_hint}">*}
                            <div id="upload_url"><input type="button" id="but" value="{$lang.upload_url_btn}" style="width: 150px;" onclick="$('#select_image_btns').hide(); $('#select_image_url').fadeIn();"></div>
                            <b>{$lang.or}</b>                    
                            <div id="upload_link"><input type="button" id="but" value="{$lang.upload_pc_btn}" style="width: 150px;"></div>
                        </div>
                        <div id="select_image_url" class="give_form" style="margin-left: 95px; margin-top: 5px;">
                            <p><input class="input-text" id="input_img_url" type="text" style="width: 145px;" name="img_url"></p>
                            <p>
                            <input type="button" id="but" value="{$lang.upload_btn}" onclick="{literal}if(($('#input_img_url').val()).length != 0) {$('#select_image_url').hide(); select_from_url($('#input_img_url').val());}{/literal}">         
                            <input type="button" id="but" value="{$lang.cancel_btn}" onclick="$('#select_image_url').hide(); $('#select_image_btns').fadeIn();">
                            </p>
                        </div>
                    </div>

                    <div id="del_img_button" style="display: none;"><input type="button" id="but" value="{$lang.delete_image}"></div>
                    
                    <div id="upload_status" style="font-size:12px; width:80%; margin:10px; padding:5px; display:none; border:1px #999 dotted; background:#eee;"></div>

                    <span id="loader" style="display:none;">{*<img src="loader.gif" alt="Loading..."/>*}</span> <span id="progress"></span>
                                
                    <div id="uploaded_image" style="margin-top: 5px;"></div>                                 
     </div>